<?php
/* @var $this PersonaController */
/* @var $model Persona */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'persona-form',
	// Please note: When you enable ajax validation, make sure the corresponding
	// controller action is handling ajax validation correctly.
	// There is a call to performAjaxValidation() commented in generated controller code.
	// See class documentation of CActiveForm for details on this.
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'Nombre'); ?>
		<?php echo $form->textField($model,'Nombre',array('size'=>60,'maxlength'=>60)); ?>
		<?php echo $form->error($model,'Nombre'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Apellido'); ?>
		<?php echo $form->textField($model,'Apellido',array('size'=>60,'maxlength'=>60)); ?>
		<?php echo $form->error($model,'Apellido'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'DNI'); ?>
		<?php echo $form->textField($model,'DNI'); ?>
		<?php echo $form->error($model,'DNI'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'FechaNacimiento'); ?>
		<?php  
			$this->widget(
							"zii.widgets.jui.CJuiDatePicker", 
							array(
									"attribute"=>"FechaNacimiento",
									"model"=>$model,
									"language"=>"es",
									//"htmlOptions" => array("readonly"=>"readonly"),
									"options"=>array(
										"showAnim"=>"fold",
										"dateformat"=>"dd-mm-yyyy",
										'changeMonth' => 'true', 
										'changeYear' => 'true',
										'yearRange'=>'-90:+0',
										//'minDate'=>strtotime("1 January 2013"),
										'maxDate'=> 'date("Y-m-d")',
										'buttonImage'=>Yii::app()->baseUrl.'/images/calendario.jpg'
									)
							)
			);
		?>
		<?php echo $form->error($model,'FechaNacimiento'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'TEParticular'); ?>
		<?php echo $form->textField($model,'TEParticular',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'TEParticular'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'TEMovil'); ?>
		<?php echo $form->textField($model,'TEMovil',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'TEMovil'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Email'); ?>
		<?php echo $form->textField($model,'Email',array('size'=>60,'maxlength'=>120)); ?>
		<?php echo $form->error($model,'Email'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Direccion'); ?>
		<?php echo $form->textField($model,'Direccion',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'Direccion'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'CiudadId'); ?>
		<?php echo $form->textField($model,'CiudadId'); ?>
		<?php echo $form->error($model,'CiudadId'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->
